from selenium.webdriver import Firefox, Chrome


def update_cookie(session, target):
    driver = Firefox()
    driver.get(target)
    # driver.find_element_by_id("normalLogin").click()
    # driver.find_element_by_id("nameNormal").send_keys(usr)
    # driver.find_element_by_id("pwdNormal").send_keys(pwd)
    session.cookies.update(
        {i["name"]: i["value"] for i in driver.get_cookies()})
    driver.close()
    return session
